Skip to content

[3.15] gh-162714: Hide the deprecated hashlib string parameter from signatures - #163016

Open
picnixz wants to merge 1 commit into
python:3.15from
picnixz:meta/crypto/c/hashlib/3.15/string-text-signature-162714
Open

picnixz wants to merge 1 commit into
python:3.15from
picnixz:meta/crypto/c/hashlib/3.15/string-text-signature-162714

Conversation

@picnixz

@picnixz picnixz commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

The signatures of hash object constructors showed string=None, while the constructors treat any explicitly given string as conflicting with data. Binding a call, applying the signature defaults and forwarding it raised TypeError.

The signatures are now given by @text_signature without string. Passing string keeps its current behavior.

Note: I couldn't use the new AC feature for renaming parameters, so I needed to find an alternative that retains the existing behavior which was suggested by Opus. Not sure if it's really worth it though.

…signatures

The signatures of hash object constructors showed `string=None`, while
the constructors treat any explicitly given `string` as conflicting with
`data`. Binding a call, applying the signature defaults and forwarding
it raised `TypeError`.

The signatures are now given by `@text_signature` without `string`.
Passing `string` keeps its current behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant